
<div class="weui-flex">
    <div class="weui-flex__item">
        <div class="top-info" style="display:none">

        </div>

        <div class="weui-grids">
            <a href="javascript:;" class="weui-grid js_grid" onclick="jumpPageWithId('/d/doctor/followDoctor')">
                <div class="weui-grid__icon">
                    <img src="/mod-page/images/addPatient.png" alt="">
                </div>
                <p class="weui-grid__label">
                    添加患者
                </p>
            </a>
            <a href="/patient/getPatientListByDoctorId" class="weui-grid js_grid" >
                <div class="weui-grid__icon">
                    <img src="images/allPatient.png" alt="">
                </div>
                <p class="weui-grid__label">
                    全部患者
                </p>
            </a>
            <a href="javascript:;" class="weui-grid js_grid" onclick="jumpPageWithId('/mod-page/studio/notice_setting.html')">
                <div class="weui-grid__icon">
                    <img src="images/setup.png" alt="">
                </div>
                <p class="weui-grid__label">
                    公告及设置
                </p>
            </a>
            <a href="javascript:;" class="weui-grid js_grid" onclick="jumpPageWithId('/mod-page/studio/inquiry.html?jflag=1')">
                <div class="weui-grid__icon">
                    <img src="images/question.png" alt="">
                </div>
                <p class="weui-grid__label">
                    问诊单
                </p>
            </a>
            <a href="prescribe/prescribe_index.html" class="weui-grid js_grid">
                <div class="weui-grid__icon">
                    <img src="images/buy.png" alt="">
                </div>
                <p class="weui-grid__label">
                    开方购药
                </p>
            </a>
            <a href="studio/studio_support.html" class="weui-grid js_grid">
                <div class="weui-grid__icon">
                    <img src="images/appreciate.png" alt="">
                </div>
                <p class="weui-grid__label">
                    赞赏
                </p>
            </a>
            <a href="studio/studio_recommend.html" class="weui-grid js_grid">
                <div class="weui-grid__icon">
                    <img src="images/recommend.png" alt="">
                </div>
                <p class="weui-grid__label">
                    推介同行
                </p>
            </a>
        </div>

    </div>
</div>

<div class="weui-flex">
    <div class="weui-flex__item">
        <img src="/mod-page/images/ad.png" style="width:100%"/>
    </div>
</div>
<div class="weui-flex">
    <div class="weui-flex__item">
        <div class="weui-panel__ft">
            <a href="javascript:void(0);" class="weui-cell weui-cell_access weui-cell_link">
                <div class="weui-cell__bd">0 人已开问诊单,待开方</div>
                <span class="weui-cell__ft"></span>
            </a>
        </div>
    </div>
</div>
<div class="weui-flex">
    <div class="weui-flex__item">
        <div class="weui-panel__bd" id="patientList">

        </div>
    </div>
</div>

<script>
    var doctorId = getQueryString("doctorId");
    var authStatus = false;
    $(function(){
        $.ajax({
            url:"/d/doctor/checkCertificateStatus?doctorId="+doctorId,
            success:function(da){
                if(da.code =="10000"){
                    document.title="[ "+da.data.doctorname+" ] "+"的工作室";
                    if(da.data.isauthentication==0){
                        $(".top-info").html("<a href=\"/mod-page/studio/doctor_certificate.html?doctorId="+doctorId+"\" id=\"goToValiLink\"><i class=\"fa fa-warning\" aria-hidden=\"true\"></i> 尚未完成用户资格认证，点击立即认证</a>").slideDown();
                    }else if(da.data.isauthentication==1){
                        $(".top-info").html("<i class=\"fa fa-warning\" aria-hidden=\"true\" ></i> 您的认证尚在审核中").slideDown();
                    }else if(da.data.isauthentication==2){
                        authStatus = true;
                    }
                }else{
                    $(".top-info").html("<i class=\"fa fa-warning\" aria-hidden=\"true\"></i> 获取验证信息失败").slideDown();
                }
            }
        });
    });


  function jumpPageWithId(url){
        if(doctorId){
            if(url.indexOf("?")>0)
                location.href=url+"&doctorId="+doctorId;
            else
                location.href=url+"?doctorId="+doctorId;
        }else{
            unkownuser("doctor")
        }
  }

   /* $("a").click(function(){
        if(authStatus){
            return true;
        }else{
            $.toast("您尚未完成认证","cancel")
            return false;
        }
    });*/


</script>
